package com.qingxin.wuye.repertory.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 出库单据
 * @author hezhiwei
 *
 */
@Entity
@Table(name = "chuku_docket")
public class ChukuDocket extends com.qingxin.sys.entity.BaseEntity implements
		java.io.Serializable {

	private static final long serialVersionUID = -5856799422550053738L;
	private String docketid;
	private String repertoryid;//所属仓库
	private String dockeCode;//单据编号
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date happenTime;//发生日期
	private String jingshou;//接收人
	private String caigou;//领用单位
	private String yanhuo;//领用人员
	private String yanshou;//
	private String remark;
	private String createBy;
	private Date createTime;
 
	private String repertoryName;//所在仓库名称
	// Constructors

	/** default constructor */
	public ChukuDocket() {
	}

	/** minimal constructor */
	public ChukuDocket(String docketid) {
		this.docketid = docketid;
	}

	/** full constructor */
	public ChukuDocket(String docketid, String repertoryid, String dockeCode,
			Date happenTime, String jingshou, String caigou,
			String yanhuo, String yanshou, String remark, String createBy,
			Date createTime) {
		this.docketid = docketid;
		this.repertoryid = repertoryid;
		this.dockeCode = dockeCode;
		this.happenTime = happenTime;
		this.jingshou = jingshou;
		this.caigou = caigou;
		this.yanhuo = yanhuo;
		this.yanshou = yanshou;
		this.remark = remark;
		this.createBy = createBy;
		this.createTime = createTime;
	}
	
	
	public ChukuDocket(String docketid, String repertoryid, String dockeCode,
			Date happenTime, String jingshou, String caigou,
			String yanhuo, String yanshou, String remark,String repertoryName) {
		this.docketid = docketid;
		this.repertoryid = repertoryid;
		this.dockeCode = dockeCode;
		this.happenTime = happenTime;
		this.jingshou = jingshou;
		this.caigou = caigou;
		this.yanhuo = yanhuo;
		this.yanshou = yanshou;
		this.remark = remark;
		this.repertoryName = repertoryName;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "docketid", unique = true, nullable = false, length = 50)
	public String getDocketid() {
		return this.docketid;
	}

	public void setDocketid(String docketid) {
		this.docketid = docketid;
	}

	@Column(name = "repertoryid", length = 100)
	public String getRepertoryid() {
		return this.repertoryid;
	}

	public void setRepertoryid(String repertoryid) {
		this.repertoryid = repertoryid;
	}

	@Column(name = "docke_code", length = 100)
	public String getDockeCode() {
		return this.dockeCode;
	}

	public void setDockeCode(String dockeCode) {
		this.dockeCode = dockeCode;
	}

	@Column(name = "happen_time", length = 23)
	public Date getHappenTime() {
		return this.happenTime;
	}

	public void setHappenTime(Date happenTime) {
		this.happenTime = happenTime;
	}

	@Column(name = "jingshou", length = 100)
	public String getJingshou() {
		return this.jingshou;
	}

	public void setJingshou(String jingshou) {
		this.jingshou = jingshou;
	}

	@Column(name = "caigou", length = 100)
	public String getCaigou() {
		return this.caigou;
	}

	public void setCaigou(String caigou) {
		this.caigou = caigou;
	}

	@Column(name = "yanhuo", length = 100)
	public String getYanhuo() {
		return this.yanhuo;
	}

	public void setYanhuo(String yanhuo) {
		this.yanhuo = yanhuo;
	}

	@Column(name = "yanshou", length = 100)
	public String getYanshou() {
		return this.yanshou;
	}

	public void setYanshou(String yanshou) {
		this.yanshou = yanshou;
	}

	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "create_by", length = 100)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Transient
	public String getRepertoryName() {
		return repertoryName;
	}

	public void setRepertoryName(String repertoryName) {
		this.repertoryName = repertoryName;
	}
}